package org.moonlight.jvm.instructions.extended;

import org.moonlight.jvm.instructions.base.BranchInstruction;
import org.moonlight.jvm.instructions.base.BytecodeReader;
import org.moonlight.jvm.rtda.exclusive.Frame;

/**
 * goto_w指令和goto指令的唯一区别就是索引从2字节变成了4字节。
 *
 * @author Moonlight
 * @createTime 2023/8/23 10:48
 **/
public class GotoW extends BranchInstruction {

    @Override
    public void fetchOperands(BytecodeReader reader) {
        this.offset = reader.readInt32();
    }

    @Override
    public void execute(Frame frame) {
        branch(frame);
    }

}
